package com.bolt.support.spring.jpa.id;

import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.id.IdentifierGenerator;
import org.springframework.data.redis.core.RedisTemplate;

import java.io.Serializable;

/**
 * 基于redis的集中式主键生成策略
 */
public class RedisIdGenerator implements IdentifierGenerator {

    private RedisTemplate<?, ?> redisTemplate;

    @Override
    public Serializable generate(SharedSessionContractImplementor session, Object object) throws HibernateException {
        return null;
    }
}

 